<template>
	<view class="box d-jc-c">
		<button @tap="logoutHandle" type="default" class="logout" v-if="loginState">退出账号</button>
		<!-- <button type="default" class="logout" v-if="!loginState">还没登录</button> -->
		<view v-if="!loginState" class="no-login">
			还未登录
		</view>

	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';
	export default {
		data() {
			return {

			}
		},
		computed: mapState(['shopInfo', 'loginState']),
		methods: {
			...mapMutations(['logout']),
			logoutHandle(){
				this.logout()
				uni.navigateBack({
					delta:1
				})
				
			}
			

		}
	}
</script>

<style lang="less" scoped>
	.no-login{
		margin-top: 200rpx;
		color: #b4b4b4;
		font-size: 34rpx;
	}
	.logout {
		position: absolute;
		width: 700rpx !important;
		bottom: 10rpx;
		width: 100%;
		background-color: #FF5551;
		color: #fff;
	}
</style>
